<!DOCTYPE html>
<html lang=zh-CN>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="author" content="monicaqin">
    <meta name="format-detection" content="telephone=no"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <script src="js/swipe.min.js"></script>
    <script>

    </script>
    <style>
        body {
            margin: 0;
            /*background: #000;*/
            font-size: 0.3rem;
        }


    </style>
</head>
<body>


<div>
    <video id="test_video" src="http://pili-live-hls.mmggoo.com/livemogu/91.m3u8"
           x5-video-player-type="h5" x5-video-player-fullscreen="true"
           autoplay></video>
</div>

<div style="position:absolute;top: 10px;" onclick="testPlay()" >

    <div id="jiaodiantu" style="width: 100%;height: 100%;">
        <div class='swipe-wrap2' style="width: 100%;">
            <div id="c" style="width: 100%;">
                <input type="button" value="竖屏播放" onclick="portrait();"></input>
                <input type="button" value="横屏播放" onclick="landscape();"></input>
                <input type="button" value="跟随旋转" onclick="autoOrientation();"></input>
            </div>

            <div id="goods" style="background-color: #fff;color: red;">
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
                <p>商品商品商品商品商品商品商品商品
                    商品商品商品商品商品</p>
            </div>
        </div>
    </div>

</div>


<script type="text/javascript">
    test_video.style.width = screen.width + "px";
    test_video.style.height = screen.height + "px";
//    c.style.width = screen.width + "px";
//    c.style.height = screen.height + "px";
//    goods.style.width = screen.width + "px";
//    goods.style.height = screen.height + "px";
</script>


<div>
    <canvas id="test"/>
</div>


<script type="text/javascript">
    window.onresize = function () {
        //alert("haha");
        test_video.style.width = screen.width;
        test_video.style.height = screen.height;
    }

    test_video.addEventListener("timeupdate", function () {
        if (test_video.currentTime > 2) {
            test_video.style.display = 'block';
        }
    });

    function testPlay() {
        test_video.play();
    }


    window.onresize = function () {
        //alert("haha");
        test_video.style.width = screen.width;
        test_video.style.height = screen.height;
    }


    function portrait() {
        test_video.setAttribute("x5-video-orientation", "portrait");
    }

    function landscape() {
        test_video.setAttribute("x5-video-orientation", "landscape");
    }

    function autoOrientation() {
        test_video.setAttribute("x5-video-orientation", "landscape|portrait")
    }

    var elem = document.getElementById('jiaodiantu');

    window.mySwipe = new Swipe(elem, {
        //1秒
        // auto: 1000,
        callback: function (index, element) {
//                $(".xiaoyuandian li").eq(index).addClass("cur").siblings().removeClass("cur");
        }
    });

    setTimeout(function () {

    }, 1000);
</script>
</body>
</html>